home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / popupx / setup.exe / _SETUP.1 / Form1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-07-01  |  3.5 KB  |  112 lines

  1. VERSION 5.00
  2. Object = "{D3732FCB-1082-11D2-AB9F-000000000000}#1.0#0"; "PopupX-Trial.ocx"
  3. Begin VB.Form Form1 
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "US Area Codes"
  6.    ClientHeight    =   2895
  7.    ClientLeft      =   45
  8.    ClientTop       =   330
  9.    ClientWidth     =   3690
  10.    Icon            =   "Form1.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   2895
  15.    ScaleWidth      =   3690
  16.    ShowInTaskbar   =   0   'False
  17.    StartUpPosition =   2  'CenterScreen
  18.    Begin PopupX_Evaluation.PopupMenu PopupMenu1 
  19.       Left            =   2910
  20.       Top             =   2550
  21.       _ExtentX        =   847
  22.       _ExtentY        =   847
  23.       ParentHwnd      =   2548
  24.       DataSource      =   "Data1"
  25.       DataCol         =   "State"
  26.       ItemDataCol     =   "AreaCode"
  27.    End
  28.    Begin VB.TextBox Text2 
  29.       DataField       =   "areacode"
  30.       Height          =   315
  31.       Left            =   2700
  32.       TabIndex        =   1
  33.       Top             =   300
  34.       Width           =   825
  35.    End
  36.    Begin VB.TextBox Text1 
  37.       DataField       =   "state"
  38.       Height          =   315
  39.       Left            =   60
  40.       TabIndex        =   0
  41.       ToolTipText     =   "Right click here"
  42.       Top             =   300
  43.       Width           =   2535
  44.    End
  45.    Begin VB.Data Data1 
  46.       Caption         =   "Data1"
  47.       Connect         =   "Access"
  48.       DatabaseName    =   ""
  49.       DefaultCursorType=   0  'DefaultCursor
  50.       DefaultType     =   2  'UseODBC
  51.       Exclusive       =   0   'False
  52.       Height          =   345
  53.       Left            =   90
  54.       Options         =   0
  55.       ReadOnly        =   0   'False
  56.       RecordsetType   =   1  'Dynaset
  57.       RecordSource    =   ""
  58.       Top             =   2580
  59.       Visible         =   0   'False
  60.       Width           =   2295
  61.    End
  62.    Begin VB.Label Label3 
  63.       BorderStyle     =   1  'Fixed Single
  64.       Caption         =   $"Form1.frx":0442
  65.       Height          =   1575
  66.       Left            =   90
  67.       TabIndex        =   4
  68.       Top             =   840
  69.       Width           =   3495
  70.    End
  71.    Begin VB.Label Label2 
  72.       AutoSize        =   -1  'True
  73.       Caption         =   "&Area Code"
  74.       Height          =   195
  75.       Left            =   2700
  76.       TabIndex        =   3
  77.       Top             =   60
  78.       Width           =   750
  79.    End
  80.    Begin VB.Label Label1 
  81.       AutoSize        =   -1  'True
  82.       Caption         =   "&State"
  83.       Height          =   195
  84.       Left            =   60
  85.       TabIndex        =   2
  86.       Top             =   60
  87.       Width           =   375
  88.    End
  89. Attribute VB_Name = "Form1"
  90. Attribute VB_GlobalNameSpace = False
  91. Attribute VB_Creatable = False
  92. Attribute VB_PredeclaredId = True
  93. Attribute VB_Exposed = False
  94. Option Explicit
  95. Private Sub Form_Load()
  96. PopupMenu1.Enabled = True
  97. Data1.DatabaseName = App.Path & "\areacodes.mdb"
  98. Data1.RecordSource = "select * from areacodes order by state"
  99. End Sub
  100. Private Sub Form_Unload(Cancel As Integer)
  101. Data1.Recordset.Close
  102. End Sub
  103. Private Sub PopupMenu1_MenuClick(ActiveMenu As String, Caption As String, itemdata As String)
  104. Text1.Text = Caption
  105. Text2.Text = itemdata
  106. End Sub
  107. Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  108. If Button = vbRightButton Then
  109.     PopupMenu1.ShowDBPopupMenu "States", X + Text1.Left, Y + Text1.Top
  110. End If
  111. End Sub
  112.